Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't delete encryption password until volume deletion succeeds #1306

Conversation

cole-h
Copy link
Member

@cole-h cole-h commented Nov 21, 2024

Description

If the encryption key is deleted, the volume is useless until the user figures out they have to delete it. It is not safe for us to decide to delete it.

Instead, we should not delete the encryption key until we are confident the volume itself was deleted.

Checklist
  • Formatted with cargo fmt
  • Built with nix build
  • Ran flake checks with nix flake check
  • Added or updated relevant tests (leave unchecked if not applicable)
  • Added or updated relevant documentation (leave unchecked if not applicable)
  • Linked to related issues (leave unchecked if not applicable)
Validating with install.determinate.systems

If a maintainer has added the upload to s3 label to this PR, it will become available for installation via install.determinate.systems:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix/pr/$PR_NUMBER | sh -s -- install

@cole-h cole-h changed the title CreateNixVolume: formatting nits Don't delete encryption password until volume deletion succeeds Nov 21, 2024
Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I asked in a DM about if you'd considered a match on self.create_volume.try_revert().await instead of reassigning the bool, but its really a nit.

@grahamc grahamc enabled auto-merge (squash) November 21, 2024 18:19
@grahamc grahamc merged commit e085b5a into main Nov 21, 2024
21 checks passed
@grahamc grahamc deleted the cole/fh-458-nix-installer-dont-delete-the-encryption-key-if-the-volume branch November 21, 2024 18:21
@cole-h cole-h added this to the 0.30.0 milestone Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants